Skip to content

fix(mcpx): cancel plugin exec when host aborts - #7852

Closed
dezren39 wants to merge 2 commits into
mainfrom
fix/issue-7076-mcpx-abort
Closed

dezren39 wants to merge 2 commits into
mainfrom
fix/issue-7076-mcpx-abort

Conversation

@dezren39

@dezren39 dezren39 commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Summary

Thread the host �[0mToolContext.abort signal through mcpx_exec so cancellation reaches either backend:

mcpx_exec
  ├─ daemon: DaemonClient.exec -> generated ops.exec CallOptions.signal
  └─ CLI: viaCLI -> runBin -> execFile signal kills the child

Session forwarding remains unchanged; cancellation does not evict a healthy daemon selection.

Evidence

  • Before: the host context signal was dropped; daemon requests and CLI child processes continued in flight.
  • After: bun test in pkgs/mcpx/plugin/opencode — 120 pass, 5 skip; tests abort both backends and verify the daemon request and CLI child stop. bun run typecheck passes.
  • The pre-existing Biome lint diagnostics remain in untouched plugin files; the new test file is lint-clean.

Merge Danger

Door: two-way

Blast Radius: small — limited to cancellation handling for the opt-in mcpx_exec plugin tool.

Closes #7076.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 8, 2026 23:26
@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 32 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: eccc75ce-2de4-4ecb-a2fc-4fb17069ab42
Commits

Reviewing files that changed from the base of the PR and between 8f79a40 and 2eebc18.

Files selected for processing: 6

  • .opencode/plugin/mcpx-session.ts
  • .opencode/plugin/mcpx/daemon.ts
  • .opencode/plugin/mcpx/mcpx-session.test.ts
  • pkgs/mcpx/plugin/opencode/mcpx-session.ts
  • pkgs/mcpx/plugin/opencode/mcpx/daemon.ts
  • pkgs/mcpx/plugin/opencode/mcpx/mcpx-session.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T23:42:34.559486Z 2eebc18 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: addbbea98f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dezren39

Copy link
Copy Markdown
Member Author

Agent note — task 17286 closing PR #7852 as superseded (lane any-c)

Fresh evidence, 2026-11-14:

  • PR fix(mcpx): cancel plugin exec when host aborts #7852 is OPEN but mergeable_state: dirty against current main. A rebase of its two commits onto current main (worktree ~/git/fleet/queue-17286-7852-mcpx-abort) conflicted in exactly the two implementation files — because main already contains this feature.
  • The same PLG-38 work landed via PR mcpx(plugin): thread host abort signal through mcpx_exec (PLG-38, #1940) #8089 (merge commit c9c4b27): commit ebaf519 threads the host abort signal through mcpx_exec (DaemonClient.exec forwards AbortSignal to CallOptions.signal, runBin kills the CLI child on abort, mcpx-session passes ToolContext.abort into both paths) with abort tests in daemon.test.ts and ops.test.ts; commit f169510 syncs the dogfood plugin copy. Main's version is in places more complete than this PR's (already-aborted guards, daemon-in-flight abort naming).
  • Salvage check (not file-list only): this PR's only behavioral delta — runBin rejecting with signal.reason on abort — was superseded by the landed design, which names the abort in its return strings; this PR's mcpx-session.test.ts coverage exists on main as the daemon.test.ts / ops.test.ts abort tests. Nothing unique remains to salvage.
  • Codex review on head 2eebc18: completed, no findings, none unresolved.
  • The two failing checks on this PR (fleet-search parity guard, scripts-test) are on its stale base and unrelated to the mcpx diff; moot on closure.

Outcome: closing as superseded by PR #8089. Head branch fix/issue-7076-mcpx-abort is retained. Issue #7076's requested change is the PLG-38 work that landed in PR #8089; #7076 itself is left to its owning queue task (it carries parked queue labels).

@dezren39 dezren39 closed this Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mcpx plugin: thread the host abort signal through mcpx_exec so aborts cancel the run (PLG-38 of #1940)

1 participant